import asyncio, aiohttp

async def main():
    async with aiohttp.ClientSession() as session:
        async with session.get('https://www.baidu.com/') as resp:
            print(resp.status)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
